OBJ = SessionUtil.o 
LIB = libinkesessionutil.a
#EXE = TestSessionUtil
HOMEDIR = ../../

CXX	= g++ 
FLAG = -fPIC -g -Wall -Wno-deprecated -D_DEBUG -D_STAT 
CXX	+= $(FLAG)
DEF	= -D_TRACE
GLOBINC	= -I$(HOMEDIR)/include/
GLOBLIB = -L$(HOMEDIR)/lib/ -L/usr/local/lib

.PHONY : all clean

all : $(LIB) $(OBJ) $(EXE)
	mkdir -p $(HOMEDIR)/include/inkesessionutil
	mkdir -p $(HOMEDIR)/lib
	mkdir -p ../c++_swig
	cp -f SessionUtil.h $(HOMEDIR)/include/inkesessionutil
	cp -f $(LIB) $(HOMEDIR)/lib/
	cp -f SessionUtil.h $(LIB) ../c++_swig/

$(LIB) : $(OBJ)
	ar -crs $@ $^

SessionUtil.o : SessionUtil.cpp
	$(CXX) -c SessionUtil.cpp -I$(HOMEDIR)/include 


TestSessionUtil : TestSessionUtil.cpp SessionUtil.cpp
	$(CXX) -o $@ $^ -I/usr/local/include -L/usr/local/lib -L/usr/local/lib/libssl.a

clean:
	rm -rf $(OBJ) $(LIB) $(EXE)

